home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000163_icon-group-sender _Fri Aug 28 13:12:14 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id NAA02925
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Fri, 28 Aug 1998 13:12:14 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA19771; Fri, 28 Aug 1998 13:11:49 -0700
To: icon-group@optima.CS.Arizona.EDU
Date: 28 Aug 1998 13:58:54 -0400
From: clayton@jazz.cc.gatech.edu (R. Clayton)
Message-Id: <ml3iujdyom9.fsf@jazz.cc.gatech.edu>
Organization: College of Computing, Georgia Tech
Sender: icon-group-request@optima.CS.Arizona.EDU
Subject: A prooner spogram.
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1313
ja cat t.icn
procedure main()
every p := perms(set(["g","m","h","f"])) do
write("A ", p[1], "ood ", p[2], "an is ", p[3], "ard to ", p[4], "ind.")
end # main
procedure perms(letters)
if *letters = 0 then
suspend ""
else
every l := !letters do
every suspend l || perms(delete(copy(letters), l))
end # perms
ja icont t.icn
Translating:
t.icn:
main
perms
No errors
Linking:
ja ./t
A hood man is gard to find.
A hood man is fard to gind.
A hood gan is mard to find.
A hood gan is fard to mind.
A hood fan is mard to gind.
A hood fan is gard to mind.
A mood han is gard to find.
A mood han is fard to gind.
A mood gan is hard to find.
A mood gan is fard to hind.
A mood fan is hard to gind.
A mood fan is gard to hind.
A good han is mard to find.
A good han is fard to mind.
A good man is hard to find.
A good man is fard to hind.
A good fan is hard to mind.
A good fan is mard to hind.
A food han is mard to gind.
A food han is gard to mind.
A food man is hard to gind.
A food man is gard to hind.
A food gan is hard to mind.
A food gan is mard to hind.
ja
Why I wrote this program in five minutes instead of one minute: I deleted l
from letters itself instead of from a copy of letters.